// Ofri Keidar 302933981 group 05

package controller;

import java.util.List;
import java.util.Map;

import model.database.DBException;

/**
 * Interface for possible transactions for Manager user.
 * Beside the following transactions, a manager can perform employee's transactions
 */
public interface ManagerController extends EmployeeController {

	/**
	 * Returns all employees
	 * @return list of all store's employees
	 * @throws DBException if had problems connecting to database 
	 */
	public List<Map<String, String>> getEmployees() throws DBException;
	
	/**
	 * Returns all customers
	 * @return list of all store's registered customers
	 * @throws DBException if had problems connecting to database 
	 */
	public List<Map<String, String>> getCustomers() throws DBException;
	
	/**
	 * Returns all customers that have ordered products in worth greater than
	 * given value
	 * @param totalSum- lower bound for order's worth
	 * @return list of all customers that have ordered specified worth of products
	 * @throws DBException if had problems connecting to database
	 */
	public List<Map<String, String>> getCustomers(double totalSum)
			throws DBException;
	
	/**
	 * Returns all customers that have ordered product matching given
	 * product name
	 * @return list of all customers that have ordered specified product
	 * @throws DBException if had problems connecting to database 
	 */
	public List<Map<String, String>> getCustomers(String productName)
			throws DBException;
	
	/**
	 * Returns total sum of orders made on given date
	 * @param date- date to check, must be a string in format: "yyyy-mm-dd"
	 * @return total sum of orders made on given date
	 * @throws DBException if had problems connecting to database
	 */
	public double getSalesReport(String date) throws DBException;
	
	/**
	 * Returns total sum of orders made on current month
	 * @return total sum of orders made on given month
	 * @throws DBException if had problems connecting to database
	 */
	public double getSalesReport() throws DBException;
}